//
//  Car.m
//  OcDay1Homework
//
//  Created by dllo on 16/5/20.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import "Car.h"

@implementation Car
//name的setter方法
-(void)setName:(NSString *)name{
    _name = name;
}
//name的getter方法
-(NSString *)name{
    return _name;
}
//brand的setter方法
-(void)setBrand:(NSString *)brand{
    _brand = brand;
}
//brand的getter方法
-(NSString *)brand{
    return _brand;
}
//number的setter方法
-(void)setNumber:(NSInteger)number{
    _number = number;
}
//number的getter方法
-(NSInteger)Number{
    return _number;
}
//price的setter方法
-(void)setPrice:(NSInteger)price{
    _price = price;
}
//price的getter方法
-(NSInteger)price{
    return _price;
}
//输出方法
-(void)myPrint{
    NSLog(@"%@ %@ %ld %ld", _name, _brand, _number, _price);
}
//自定义初始化
-(instancetype)initWithName:(NSString *)name withBrand:(NSString *)brand withNumber:(NSInteger)number withPrice:(NSInteger)price{
    self = [super init];
    if(self) {
        _name = name;
        _brand = brand;
        _number = number;
        _price = price;
    }
    return self;
}

@end
